OpenColorIOΒΆ
Introduction
OpenColorIO (OCIO) is a color management system that allows consistently configuring the various color spaces used in rendering and across other color dependent departments, such as texturing and compositing.
An OCIO configuration defines color spaces and the transformation from a given color space to another. For example, 8 bits color textures are usually stored in the invert-sRGB color space which is non-linear, while illumination computations must be performed in a linear color space, and eventually the resulting image is displayed on a computer screen which usually uses the sRGB color space which is also non-linear. OpenColorIO performs the transformation from the texture color space to the rendering color space to the display color space.
More information on OpenColorIO at https://opencolorio.org.
The following diagrams shows how colors, coming from input files as textures or mattes or from the color picker, and going to output files and screen, are transformed into and from the Rendering color space:
Setup
Guerilla looks for the OCIO configuration file in the following order:
Preferences -> Project Settings -> OCIO -> OCIO Configuration File - Using the OCIO environment variable.
- In ocio/config.ocio in the Guerilla installation directory.
By default, Guerilla provides a configuration file for general sRGB color management.
- You can set the OCIO environment variable to the location of your config.ocio file, prior to running Guerilla.
- You can set the
Preferences -> Project Settings -> OCIO -> OCIO Configuration File attribute in the Guerilla project. - rendering: the rendering colorspace. If the rendering role is not defined, Guerilla falls back on the scene_linear role, and eventually on the linear role/color space.
- color_picking: the color picker viewing color space. Colors picked using the color picker are automatically converted into the rendering color space.
- data: the colorspace for non color data, such as positions, normals. Data colorspaces usually won't involve color transformation.
- texture_int_paint: the default color space for integer input color textures.
- texture_float_paint: the default color space for half/float input color textures.
- texture_paint: the color space for input color textures.
- the srgb_equivalent role
- the sRGB color space (found in the Guerilla default config.ocio)
- the Output - sRGB color space (found in ACES)
- and eventually, the rendering color space
- the texture_int_paint role
- the srgb_equivalent role
- the sRGB color space (found in the Guerilla default config.ocio)
- the Utility - sRGB - Texture color space (found in ACES)
- eventually, the texture_paint role
- the texture_float_paint role
- eventually, the texture_paint role
- Set the
Preferences -> Project Settings -> OCIO -> Texture Paint attribute in the Guerilla project to a specific color space. - Select the shader to adjust
- Select the correct color space from the
Gamma attribute - the srgb_equivalent role
- the sRGB color space (found in the Guerilla default config.ocio)
- the Output - sRGB color space (found in ACES)
- and eventually, the rendering color space
- "Input - Generic - sRGB - Texture" as in ACES configs
- "vd16" as in spi-anim config
- "srgb8" as in spi-vfx config
- "sRGB OETF" as in Filmic Blender config
Roles
OCIO defines roles as aliases for color spaces. For instance, you can set texture to use a specific color space (sRGB, for instance) or to use the texture_paint role and alias the sRGB color space to texture_paint.
This is handy to switch from an OCIO configuration to another, where color spaces names would be different.
Roles are usually defined directly in the config.ocio file, but you
can override them in Guerilla, using the
Guerilla natively uses the following roles:
Display Views
OCIO defines color transforms for displays, which can be used directly in the top-right drop down list of the Render View.
Textures
Color textures (such as Diffuse Color, etc.) have a proper color space and are converted at render time to the internal Rendering color space, so it is necessary to specify the correct texture color space for textures to have to correct aspect.
By default, all color texture shaders are set to the empty string and left for Guerilla to select at run-time.
Rendered Images
The color space of rendered images can be set directly in the
sRGB Color Management
This is the most classic scenario, and Guerilla provides a simple configuration to deal with it. By default, the configuration set texture_int_paint to sRGB, which is correct for 8/16 bits color textures, and texture_float_paint to linear, which correct for half/float color textures.
ACES Color Management
The Academy Color Encoding System comes with an OCIO configuration file which can be found here: https://github.com/imageworks/OpenColorIO-Configs.
The ACES uses a wide gammut base color space which encompasses a large variety of devices, such as cameras, monitors, etc. It more reliably represents a wide range of colors, and avoids problematic out-of sRGB range values (negative colors, hdr) which would show up when strictly using sRGB.
Display on a sRGB monitor
Use the sRGB Display View in the top right drop down list of the Render View. Note that your image will appear darker compared to the default Guerilla OCIO configuration, because ACES sRGB Display View accounts for the high dynamic potential of the ACES color spaces, and a 1-white point maps to a less than white on the screen, thus allowing a perceived higher range of light dynamics.
Textures
The ACES OCIO configurations doesn't provide texture_int_paint and texture_float_paint roles, so integer textures will fallback on the Utility - sRGB - Texture color space. Float textures will fallback on the texture_paint role, which is the ACES - ACEScc color space by default (ACES 1.0.3.)
There is nothing particular to do. To enforce sRGB textures, choose Utility - sRGB - Texture in the texture_int_paint role.
Simply switch the texture_float_paint role to the lin_srgb color space.
Legacy
Project Gamma
For compatibility reasons with previous versions of Guerilla, you
can enable using the legacy Project Gamma by checking the
In effect, this overrides the default OCIO role with the
Missing Color Spaces
To help transitionning from previous color management to OCIO, Guerilla has a few hardcoded fallbacks that allows looking up the current color configuration when stumbling upon a missing color space.
"sRGB" falls back to:
"linear" falls back to the rendering color space.